﻿using System;
using System.Diagnostics;

namespace ProjectPacker
{
    public class Packer7z
    {
        public static void Pack(String fileName)
        {
            Process process = new Process();
            process.StartInfo.FileName = "7z.exe";
            process.StartInfo.Arguments = " a " + fileName + " .\\Temp\\*" + " -r -aoa";
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.RedirectStandardInput = false;
            process.StartInfo.RedirectStandardOutput = false;
            process.StartInfo.CreateNoWindow = true;

            process.Start();
            process.WaitForExit();
        }
    }
}
